package cn.iocoder.boot.springai001.tools.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 修复SQL请求 VO
 *
 * @author Agent System
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "修复SQL请求")
public class FixSqlReqVO {

    @Schema(description = "原始SQL语句", requiredMode = Schema.RequiredMode.REQUIRED,
            example = "SELECT COUNT(*) FROM users WHERE age > 18 AND")
    @NotBlank(message = "SQL不能为空")
    private String sql;

    @Schema(description = "错误信息", requiredMode = Schema.RequiredMode.REQUIRED,
            example = "Syntax error near 'AND'")
    @NotBlank(message = "错误信息不能为空")
    private String errorMessage;

    @Schema(description = "用户问题", example = "查询成年用户数量")
    private String userQuery;

    @Schema(description = "表结构信息", example = "users表包含...")
    private String tableSchema;
}

